/*
 * IGoodsModel.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.response.CategoryResponse;
import com.yidiandao.business.data.response.GoodsDetailResponse;
import com.yidiandao.business.data.response.GoodsDetailValueResponse;

import java.util.List;

/** 物品相关 */
public interface IGoodsModel {
    void getGoodsDetail(String tag, String goodsId, onGetGoodsDataListener listener);

    void addToCart(String tag, String goodsId, int count, OnAddToShoppingCartListener listener);

    void goodsCategory(String tag, onGoodsCategoryListener listener);

    /** 购买物品 */
    void buyNow(String tag, String orderId, int number, onBuyNowListener listener);

    /** 商品详情中的商品评价 type ：0为全部，1为好评，2为中评，3为差评，4为晒图 */
    void getValueData(
            String tag, String goodsId, int type, int currentPage, onGetDataListener listener);

    interface onGetGoodsDataListener {

        void onFailed();

        void onFinal();

        void onSuccess(GoodsDetailResponse.DataBean dataBean);
    }

    interface onGetDataListener {

        void onFailed();

        void onFinal();

        void onSuccess(
                GoodsDetailValueResponse response,
                List<GoodsDetailValueResponse.ValueBean> data);
    }

    interface onGoodsCategoryListener {

        void onFailed();

        void onFinal();

        void onSuccess(List<CategoryResponse.DataBean> data);
    }

    interface onBuyNowListener {

        void onFailed();

        void onFinal();

        void onSuccess(String json, String recId, int goodsNumber, float goodsPrice);
    }

    interface OnAddToShoppingCartListener {

        void onSuccess(String recId, int goodsNumber, float goodsPrice);

        void onFinal();
    }
}
